package com.the_ring.behavior.iterator;

/**
 * @author: t22306139
 * @date: 2023/12/1  14:14
 */
public class MainTest {

    public static void main(String[] args) {
        ShopMenu shopMenu = new ShopMenu();
        MenuIterator iterator = new MenuIterator(shopMenu.getMenuItems());
        while (iterator.hasNext()) {
            MenuItem menuItem = (MenuItem) iterator.next();
            System.out.println(menuItem.getName() + "***" + menuItem.getDescription() + "***" + menuItem.getPrice());
        }
    }
}
